package com.demo.controller;

import com.demo.entity.po.User;
import com.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author simon
 * @date 2019/4/30 16:10
 * @copyright:
 * @modifier
 * @motto a no talent, people who have to study hard
 */
@RestController
@RequestMapping(value = "/hello")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping(value = "/a")
    public User hello(String userId) {

        return userService.findById(userId);
    }
}
